package com.msl.entity;

import com.msl.MslApp;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by de on 2018/7/17.
 */

public class CodeInfoControl {

      public static void  insert(CodeInfo entity)
      {
          CodeInfo codeInfo = entity;
          try {
              MslApp.daoSession.getCodeInfoDao().insert(codeInfo);
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
      }

    public  static void  delete(CodeInfo entity)
    {
        CodeInfo codeInfo = entity;
        try {
            MslApp.daoSession.getCodeInfoDao().delete(codeInfo);
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

    public static List<CodeInfo>  query()
    {
        List<CodeInfo>  list = new ArrayList<CodeInfo>();
        try {
            list = MslApp.daoSession.getCodeInfoDao().loadAll();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
        finally
        {
            return list;
        }
    }




}
